package com.sfzd5.UI;

import javax.swing.*;
import java.awt.*;

public class JImage extends JLabel {
    public JImage(){
        super();
        setOpaque(true);
        setVerticalTextPosition(JLabel.BOTTOM);
        setHorizontalTextPosition(JLabel.CENTER);
    }

    public void setImage(Image image){
        Icon icon = new ImageIcon(image);
        this.setIcon(icon);
    }
}
